package com.example.demo.collection.bitset;

import java.util.BitSet;

/**
 * @author luowj12
 * @since 2021/6/3 14:18
 */
public class BitSetTest {

    public static void main(String[] args) {
        int a[]={1,2,3,4,5,6};
        BitSet bitSet = new BitSet(6);
        for(int i=0;i<a.length;i++){
            bitSet.set(a[i],true);
        }
        
        System.out.println(bitSet.size());
        System.out.println(bitSet.get(7));
        System.out.println(bitSet.get(3));
    }

}
